import React from 'react'
import ReactDOM from 'react-dom/client'

import App from './App'
import { HashRouter, BrowserRouter } from 'react-router-dom';

//react-redux  桥接工具
import { Provider } from 'react-redux';
//redux 仓库数据
import store from './store'
// 利用环境变量切换不同路由类型
const Router = process.env.NODE_ENV === 'production' ? BrowserRouter : HashRouter

const root = ReactDOM.createRoot(document.querySelector('#app'))

root.render(
  <Provider store={store}>
    <Router>
      <App />
    </Router>
  </Provider>
)
